package com.cloud.xiao.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Component
//调用的微服务名称
@FeignClient(value = "cloud-payment-service")
@RequestMapping("/pay")
public interface FeignService {
    //需要调用的接口
    @GetMapping(value = "/getDiscovery/{id}")
    String getDiscovery(@PathVariable("id") Long id);


    @GetMapping(value = "/ok/{id}")
    String ok(@PathVariable("id") Long id);

    @GetMapping(value = "/timeOut/{id}")
    String timeOut(@PathVariable("id") Long id) throws Exception;
}
